package com.ice.delay.task.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ice.delay.task.core.model.DelayTaskModule;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface DelayTaskModuleDao extends BaseMapper<DelayTaskModule> {
    /**
     * 查询延迟任务模块
     * @Author wangwei
     * @Date 2022/5/7
     */
    default DelayTaskModule find(DelayTaskModule delayTaskModule) {
        return this.selectOne(new LambdaQueryWrapper<DelayTaskModule>().eq(DelayTaskModule::getModuleCode, delayTaskModule.getModuleCode()));
    }
}